﻿#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
#include"queue.h"
typedef int BTDatatype;
typedef struct BinaryTreeNode
{
	BTDatatype data;
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
}BTNode;
BTNode* CreatBinaryTree();//创建二叉树
BTNode* BuyNode(BTDatatype x);//插入数据
void PreOrder(BTNode* root);//前序
void InOrder(BTNode* root);//中序
void PostOrder(BTNode* root);//后序
int BinaryTreeSize(BTNode* root);//节点个数
int BinaryTreeleafSize(BTNode* root);//叶子结点个数
int BinaryTreeHeight(BTNode* root);//求树的高度
int BinaryTreeleafkSize(BTNode* root,int k);//第K层叶子节点的个数;
BTNode* BinaryTreeFind(BTNode* root, BTDatatype x);//查找值为x的结点
void BinaryTreeDestroy(BTNode* root);//二叉树的销毁
void LevelOrder(BTNode* root);
bool BinaryTreeComplete(BTNode* root);//判断是否为满二叉树
